<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">System.Console.Haskeline.Monads</span><span class="hs-special">(</span><span>
</span><span id="line-2"></span><span>                </span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.Class.html#MonadTrans"><span class="hs-identifier">MonadTrans</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-3"></span><span>                </span><span class="annot"><a href="../../base/src/Control.Monad.IO.Class.html#MonadIO"><span class="hs-identifier">MonadIO</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-4"></span><span>                </span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.Reader.html#ReaderT"><span class="hs-identifier">ReaderT</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-5"></span><span>                </span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.Reader.html#runReaderT"><span class="hs-identifier">runReaderT</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-6"></span><span>                </span><span class="annot"><a href="System.Console.Haskeline.Monads.html#runReaderT%27"><span class="hs-identifier">runReaderT'</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-7"></span><span>                </span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.Reader.html#mapReaderT"><span class="hs-identifier">mapReaderT</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-8"></span><span>                </span><span class="annot"><a href="System.Console.Haskeline.Monads.html#asks"><span class="hs-identifier">asks</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-9"></span><span>                </span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.State.Strict.html#StateT"><span class="hs-identifier">StateT</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-10"></span><span>                </span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.State.Strict.html#runStateT"><span class="hs-identifier">runStateT</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-11"></span><span>                </span><span class="annot"><a href="System.Console.Haskeline.Monads.html#evalStateT%27"><span class="hs-identifier">evalStateT'</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-12"></span><span>                </span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.State.Strict.html#mapStateT"><span class="hs-identifier">mapStateT</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-13"></span><span>                </span><span class="annot"><a href="System.Console.Haskeline.Monads.html#gets"><span class="hs-identifier">gets</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-14"></span><span>                </span><span class="annot"><a href="System.Console.Haskeline.Monads.html#modify"><span class="hs-identifier">modify</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-15"></span><span>                </span><span class="annot"><a href="System.Console.Haskeline.Monads.html#update"><span class="hs-identifier">update</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-16"></span><span>                </span><span class="annot"><a href="System.Console.Haskeline.Monads.html#MonadReader"><span class="hs-identifier">MonadReader</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-17"></span><span>                </span><span class="annot"><a href="System.Console.Haskeline.Monads.html#MonadState"><span class="hs-identifier">MonadState</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-18"></span><span>                </span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.Maybe.html#MaybeT"><span class="hs-identifier">MaybeT</span></a></span><span class="hs-special">(</span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.Maybe.html#MaybeT"><span class="hs-identifier">MaybeT</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-19"></span><span>                </span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.Maybe.html#runMaybeT"><span class="hs-identifier">runMaybeT</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-20"></span><span>                </span><span class="annot"><a href="System.Console.Haskeline.Monads.html#orElse"><span class="hs-identifier">orElse</span></a></span><span>
</span><span id="line-21"></span><span>                </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-22"></span><span>
</span><span id="line-23"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Control.Monad.html#"><span class="hs-identifier">Control.Monad</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Base.html#liftM"><span class="hs-identifier">liftM</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-24"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../exceptions/src/Control.Monad.Catch.html#"><span class="hs-identifier">Control.Monad.Catch</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-25"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Control.Monad.IO.Class.html#"><span class="hs-identifier">Control.Monad.IO.Class</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Control.Monad.IO.Class.html#MonadIO"><span class="hs-identifier">MonadIO</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-26"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.Class.html#"><span class="hs-identifier">Control.Monad.Trans.Class</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.Class.html#MonadTrans"><span class="hs-identifier">MonadTrans</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-27"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.Maybe.html#"><span class="hs-identifier">Control.Monad.Trans.Maybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.Maybe.html#MaybeT"><span class="hs-identifier">MaybeT</span></a></span><span class="hs-special">(</span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.Maybe.html#MaybeT"><span class="hs-identifier">MaybeT</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.Maybe.html#runMaybeT"><span class="hs-identifier">runMaybeT</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-28"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.Reader.html#"><span class="hs-identifier">Control.Monad.Trans.Reader</span></a></span><span> </span><span class="hs-keyword">hiding</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.Reader.html#ask"><span class="hs-identifier">ask</span></a></span><span class="hs-special">,</span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.Reader.html#asks"><span class="hs-identifier">asks</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-29"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.Reader.html#"><span class="hs-identifier">Control.Monad.Trans.Reader</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">Reader</span></span><span>
</span><span id="line-30"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.State.Strict.html#"><span class="hs-identifier">Control.Monad.Trans.State.Strict</span></a></span><span> </span><span class="hs-keyword">hiding</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.State.Strict.html#get"><span class="hs-identifier">get</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.State.Strict.html#put"><span class="hs-identifier">put</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.State.Strict.html#gets"><span class="hs-identifier">gets</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.State.Strict.html#modify"><span class="hs-identifier">modify</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-31"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.State.Strict.html#"><span class="hs-identifier">Control.Monad.Trans.State.Strict</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">State</span></span><span>
</span><span id="line-32"></span><span>
</span><span id="line-33"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Data.IORef.html#"><span class="hs-identifier">Data.IORef</span></a></span><span>
</span><span id="line-34"></span><span>
</span><span id="line-35"></span><span class="hs-keyword">class</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092672"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span id="MonadReader"><span class="annot"><a href="System.Console.Haskeline.Monads.html#MonadReader"><span class="hs-identifier hs-var">MonadReader</span></a></span></span><span> </span><span id="local-6989586621679092673"><span class="annot"><a href="#local-6989586621679092673"><span class="hs-identifier hs-type">r</span></a></span></span><span> </span><span id="local-6989586621679092672"><span class="annot"><a href="#local-6989586621679092672"><span class="hs-identifier hs-type">m</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-36"></span><span>    </span><span id="ask"><span class="annot"><a href="System.Console.Haskeline.Monads.html#ask"><span class="hs-identifier hs-type">ask</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621679092672"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092673"><span class="hs-identifier hs-type">r</span></a></span><span>
</span><span id="line-37"></span><span>
</span><span id="line-38"></span><span id="local-6989586621679092666"><span id="local-6989586621679092667"><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092667"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="System.Console.Haskeline.Monads.html#MonadReader"><span class="hs-identifier hs-type">MonadReader</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092666"><span class="hs-identifier hs-type">r</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.Reader.html#ReaderT"><span class="hs-identifier hs-type">ReaderT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092666"><span class="hs-identifier hs-type">r</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092667"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-39"></span><span>    </span><span id="local-6989586621679092530"><span class="annot"><span class="annottext">ask :: ReaderT r m r
</span><a href="#local-6989586621679092530"><span class="hs-identifier hs-var hs-var hs-var hs-var">ask</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ReaderT r m r
forall (m :: * -&gt; *) r. Monad m =&gt; ReaderT r m r
</span><a href="../../transformers/src/Control.Monad.Trans.Reader.html#ask"><span class="hs-identifier hs-var">Reader.ask</span></a></span></span></span><span>
</span><span id="line-40"></span><span>
</span><span id="line-41"></span><span id="local-6989586621679092661"><span id="local-6989586621679092662"><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092662"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="System.Console.Haskeline.Monads.html#MonadReader"><span class="hs-identifier hs-type">MonadReader</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092661"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.State.Strict.html#StateT"><span class="hs-identifier hs-type">StateT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092661"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092662"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-42"></span><span>    </span><span id="local-6989586621679092521"><span class="annot"><span class="annottext">ask :: StateT s m s
</span><a href="#local-6989586621679092521"><span class="hs-identifier hs-var hs-var hs-var hs-var">ask</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">StateT s m s
forall s (m :: * -&gt; *). MonadState s m =&gt; m s
</span><a href="System.Console.Haskeline.Monads.html#get"><span class="hs-identifier hs-var">get</span></a></span></span></span><span>
</span><span id="line-43"></span><span>
</span><span id="line-44"></span><span id="local-6989586621679092649"><span id="local-6989586621679092650"><span id="local-6989586621679092651"><span class="hs-keyword">instance</span><span> </span><span class="hs-pragma">{-# OVERLAPPABLE</span><span> </span><span class="hs-pragma">#-}</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="System.Console.Haskeline.Monads.html#MonadReader"><span class="hs-identifier hs-type">MonadReader</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092651"><span class="hs-identifier hs-type">r</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092650"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.Class.html#MonadTrans"><span class="hs-identifier hs-type">MonadTrans</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092649"><span class="hs-identifier hs-type">t</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679092649"><span class="hs-identifier hs-type">t</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092650"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-45"></span><span>    </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="System.Console.Haskeline.Monads.html#MonadReader"><span class="hs-identifier hs-type">MonadReader</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092651"><span class="hs-identifier hs-type">r</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679092649"><span class="hs-identifier hs-type">t</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092650"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-46"></span><span>    </span><span id="local-6989586621679092508"><span class="annot"><span class="annottext">ask :: t m r
</span><a href="#local-6989586621679092508"><span class="hs-identifier hs-var hs-var hs-var hs-var">ask</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m r -&gt; t m r
forall (t :: (* -&gt; *) -&gt; * -&gt; *) (m :: * -&gt; *) a.
(MonadTrans t, Monad m) =&gt;
m a -&gt; t m a
</span><a href="../../transformers/src/Control.Monad.Trans.Class.html#lift"><span class="hs-identifier hs-var">lift</span></a></span><span> </span><span class="annot"><span class="annottext">m r
forall r (m :: * -&gt; *). MonadReader r m =&gt; m r
</span><a href="System.Console.Haskeline.Monads.html#ask"><span class="hs-identifier hs-var">ask</span></a></span></span></span></span><span>
</span><span id="line-47"></span><span>
</span><span id="line-48"></span><span id="local-6989586621679092643"><span id="local-6989586621679092644"><span id="local-6989586621679092645"><span class="annot"><a href="System.Console.Haskeline.Monads.html#asks"><span class="hs-identifier hs-type">asks</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="System.Console.Haskeline.Monads.html#MonadReader"><span class="hs-identifier hs-type">MonadReader</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092645"><span class="hs-identifier hs-type">r</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092644"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679092645"><span class="hs-identifier hs-type">r</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679092643"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679092644"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092643"><span class="hs-identifier hs-type">a</span></a></span></span></span></span><span>
</span><span id="line-49"></span><span id="asks"><span class="annot"><span class="annottext">asks :: forall r (m :: * -&gt; *) a. MonadReader r m =&gt; (r -&gt; a) -&gt; m a
</span><a href="System.Console.Haskeline.Monads.html#asks"><span class="hs-identifier hs-var hs-var">asks</span></a></span></span><span> </span><span id="local-6989586621679092502"><span class="annot"><span class="annottext">r -&gt; a
</span><a href="#local-6989586621679092502"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(r -&gt; a) -&gt; m r -&gt; m a
forall (m :: * -&gt; *) a1 r. Monad m =&gt; (a1 -&gt; r) -&gt; m a1 -&gt; m r
</span><a href="../../base/src/GHC.Base.html#liftM"><span class="hs-identifier hs-var">liftM</span></a></span><span> </span><span class="annot"><span class="annottext">r -&gt; a
</span><a href="#local-6989586621679092502"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">m r
forall r (m :: * -&gt; *). MonadReader r m =&gt; m r
</span><a href="System.Console.Haskeline.Monads.html#ask"><span class="hs-identifier hs-var">ask</span></a></span><span>
</span><span id="line-50"></span><span>
</span><span id="line-51"></span><span class="hs-keyword">class</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092656"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span id="MonadState"><span class="annot"><a href="System.Console.Haskeline.Monads.html#MonadState"><span class="hs-identifier hs-var">MonadState</span></a></span></span><span> </span><span id="local-6989586621679092657"><span class="annot"><a href="#local-6989586621679092657"><span class="hs-identifier hs-type">s</span></a></span></span><span> </span><span id="local-6989586621679092656"><span class="annot"><a href="#local-6989586621679092656"><span class="hs-identifier hs-type">m</span></a></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-52"></span><span>    </span><span id="get"><span class="annot"><a href="System.Console.Haskeline.Monads.html#get"><span class="hs-identifier hs-type">get</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621679092656"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092657"><span class="hs-identifier hs-type">s</span></a></span><span>
</span><span id="line-53"></span><span>    </span><span id="put"><span class="annot"><a href="System.Console.Haskeline.Monads.html#put"><span class="hs-identifier hs-type">put</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621679092657"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679092656"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-54"></span><span>
</span><span id="line-55"></span><span id="local-6989586621679092634"><span id="local-6989586621679092635"><span id="local-6989586621679092636"><span class="annot"><a href="System.Console.Haskeline.Monads.html#gets"><span class="hs-identifier hs-type">gets</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="System.Console.Haskeline.Monads.html#MonadState"><span class="hs-identifier hs-type">MonadState</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092636"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092635"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679092636"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679092634"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679092635"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092634"><span class="hs-identifier hs-type">a</span></a></span></span></span></span><span>
</span><span id="line-56"></span><span id="gets"><span class="annot"><span class="annottext">gets :: forall s (m :: * -&gt; *) a. MonadState s m =&gt; (s -&gt; a) -&gt; m a
</span><a href="System.Console.Haskeline.Monads.html#gets"><span class="hs-identifier hs-var hs-var">gets</span></a></span></span><span> </span><span id="local-6989586621679092495"><span class="annot"><span class="annottext">s -&gt; a
</span><a href="#local-6989586621679092495"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(s -&gt; a) -&gt; m s -&gt; m a
forall (m :: * -&gt; *) a1 r. Monad m =&gt; (a1 -&gt; r) -&gt; m a1 -&gt; m r
</span><a href="../../base/src/GHC.Base.html#liftM"><span class="hs-identifier hs-var">liftM</span></a></span><span> </span><span class="annot"><span class="annottext">s -&gt; a
</span><a href="#local-6989586621679092495"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">m s
forall s (m :: * -&gt; *). MonadState s m =&gt; m s
</span><a href="System.Console.Haskeline.Monads.html#get"><span class="hs-identifier hs-var">get</span></a></span><span>
</span><span id="line-57"></span><span>
</span><span id="line-58"></span><span id="local-6989586621679092629"><span id="local-6989586621679092630"><span class="annot"><a href="System.Console.Haskeline.Monads.html#modify"><span class="hs-identifier hs-type">modify</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="System.Console.Haskeline.Monads.html#MonadState"><span class="hs-identifier hs-type">MonadState</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092630"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092629"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679092630"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679092630"><span class="hs-identifier hs-type">s</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679092629"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span></span></span><span>
</span><span id="line-59"></span><span id="modify"><span class="annot"><span class="annottext">modify :: forall s (m :: * -&gt; *). MonadState s m =&gt; (s -&gt; s) -&gt; m ()
</span><a href="System.Console.Haskeline.Monads.html#modify"><span class="hs-identifier hs-var hs-var">modify</span></a></span></span><span> </span><span id="local-6989586621679092489"><span class="annot"><span class="annottext">s -&gt; s
</span><a href="#local-6989586621679092489"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m s
forall s (m :: * -&gt; *). MonadState s m =&gt; m s
</span><a href="System.Console.Haskeline.Monads.html#get"><span class="hs-identifier hs-var">get</span></a></span><span> </span><span class="annot"><span class="annottext">m s -&gt; (s -&gt; m ()) -&gt; m ()
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; (a -&gt; m b) -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E%3D"><span class="hs-operator hs-var">&gt;&gt;=</span></a></span><span> </span><span class="annot"><span class="annottext">s -&gt; m ()
forall s (m :: * -&gt; *). MonadState s m =&gt; s -&gt; m ()
</span><a href="System.Console.Haskeline.Monads.html#put"><span class="hs-identifier hs-var">put</span></a></span><span> </span><span class="annot"><span class="annottext">(s -&gt; m ()) -&gt; (s -&gt; s) -&gt; s -&gt; m ()
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">s -&gt; s
</span><a href="#local-6989586621679092489"><span class="hs-identifier hs-var">f</span></a></span><span>
</span><span id="line-60"></span><span>
</span><span id="line-61"></span><span id="local-6989586621679092618"><span id="local-6989586621679092619"><span id="local-6989586621679092620"><span class="annot"><a href="System.Console.Haskeline.Monads.html#update"><span class="hs-identifier hs-type">update</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="System.Console.Haskeline.Monads.html#MonadState"><span class="hs-identifier hs-type">MonadState</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092620"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092619"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679092620"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679092618"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span class="annot"><a href="#local-6989586621679092620"><span class="hs-identifier hs-type">s</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679092619"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092618"><span class="hs-identifier hs-type">a</span></a></span></span></span></span><span>
</span><span id="line-62"></span><span id="update"><span class="annot"><span class="annottext">update :: forall s (m :: * -&gt; *) a. MonadState s m =&gt; (s -&gt; (a, s)) -&gt; m a
</span><a href="System.Console.Haskeline.Monads.html#update"><span class="hs-identifier hs-var hs-var">update</span></a></span></span><span> </span><span id="local-6989586621679092480"><span class="annot"><span class="annottext">s -&gt; (a, s)
</span><a href="#local-6989586621679092480"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-63"></span><span>    </span><span id="local-6989586621679092479"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679092479"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">m s
forall s (m :: * -&gt; *). MonadState s m =&gt; m s
</span><a href="System.Console.Haskeline.Monads.html#get"><span class="hs-identifier hs-var">get</span></a></span><span>
</span><span id="line-64"></span><span>    </span><span class="hs-keyword">let</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679092478"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679092478"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679092477"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679092477"><span class="hs-identifier hs-var">s'</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">s -&gt; (a, s)
</span><a href="#local-6989586621679092480"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679092479"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-65"></span><span>    </span><span class="annot"><span class="annottext">s -&gt; m ()
forall s (m :: * -&gt; *). MonadState s m =&gt; s -&gt; m ()
</span><a href="System.Console.Haskeline.Monads.html#put"><span class="hs-identifier hs-var">put</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679092477"><span class="hs-identifier hs-var">s'</span></a></span><span>
</span><span id="line-66"></span><span>    </span><span class="annot"><span class="annottext">a -&gt; m a
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679092478"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-67"></span><span>
</span><span id="line-68"></span><span id="local-6989586621679092611"><span id="local-6989586621679092612"><span id="local-6989586621679092613"><span class="annot"><a href="System.Console.Haskeline.Monads.html#runReaderT%27"><span class="hs-identifier hs-type">runReaderT'</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621679092613"><span class="hs-identifier hs-type">r</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.Reader.html#ReaderT"><span class="hs-identifier hs-type">ReaderT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092613"><span class="hs-identifier hs-type">r</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092612"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092611"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679092612"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092611"><span class="hs-identifier hs-type">a</span></a></span></span></span></span><span>
</span><span id="line-69"></span><span id="runReaderT%27"><span class="annot"><span class="annottext">runReaderT' :: forall r (m :: * -&gt; *) a. r -&gt; ReaderT r m a -&gt; m a
</span><a href="System.Console.Haskeline.Monads.html#runReaderT%27"><span class="hs-identifier hs-var hs-var">runReaderT'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(ReaderT r m a -&gt; r -&gt; m a) -&gt; r -&gt; ReaderT r m a -&gt; m a
forall a b c. (a -&gt; b -&gt; c) -&gt; b -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#flip"><span class="hs-identifier hs-var">flip</span></a></span><span> </span><span class="annot"><span class="annottext">ReaderT r m a -&gt; r -&gt; m a
forall r (m :: * -&gt; *) a. ReaderT r m a -&gt; r -&gt; m a
</span><a href="../../transformers/src/Control.Monad.Trans.Reader.html#runReaderT"><span class="hs-identifier hs-var hs-var">runReaderT</span></a></span><span>
</span><span id="line-70"></span><span>
</span><span id="line-71"></span><span id="local-6989586621679092658"><span id="local-6989586621679092659"><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092659"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="System.Console.Haskeline.Monads.html#MonadState"><span class="hs-identifier hs-type">MonadState</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092658"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.State.Strict.html#StateT"><span class="hs-identifier hs-type">StateT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092658"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092659"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-72"></span><span>    </span><span id="local-6989586621679092468"><span class="annot"><span class="annottext">get :: StateT s m s
</span><a href="#local-6989586621679092468"><span class="hs-identifier hs-var hs-var hs-var hs-var">get</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">StateT s m s
forall (m :: * -&gt; *) s. Monad m =&gt; StateT s m s
</span><a href="../../transformers/src/Control.Monad.Trans.State.Strict.html#get"><span class="hs-identifier hs-var">State.get</span></a></span><span>
</span><span id="line-73"></span><span>    </span><span id="local-6989586621679092466"><span class="annot"><span class="annottext">put :: s -&gt; StateT s m ()
</span><a href="#local-6989586621679092466"><span class="hs-identifier hs-var hs-var hs-var hs-var">put</span></a></span></span><span> </span><span id="local-6989586621679092465"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679092465"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">s -&gt; StateT s m ()
forall (m :: * -&gt; *) s. Monad m =&gt; s -&gt; StateT s m ()
</span><a href="../../transformers/src/Control.Monad.Trans.State.Strict.html#put"><span class="hs-identifier hs-var">State.put</span></a></span><span> </span><span class="annot"><span class="annottext">(s -&gt; StateT s m ()) -&gt; s -&gt; StateT s m ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24%21"><span class="hs-operator hs-var">$!</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679092465"><span class="hs-identifier hs-var">x</span></a></span></span></span><span>
</span><span id="line-74"></span><span>
</span><span id="line-75"></span><span id="local-6989586621679092591"><span id="local-6989586621679092592"><span id="local-6989586621679092593"><span class="hs-keyword">instance</span><span> </span><span class="hs-pragma">{-# OVERLAPPABLE</span><span> </span><span class="hs-pragma">#-}</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="System.Console.Haskeline.Monads.html#MonadState"><span class="hs-identifier hs-type">MonadState</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092593"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092592"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.Class.html#MonadTrans"><span class="hs-identifier hs-type">MonadTrans</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092591"><span class="hs-identifier hs-type">t</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679092591"><span class="hs-identifier hs-type">t</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092592"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-76"></span><span>    </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="System.Console.Haskeline.Monads.html#MonadState"><span class="hs-identifier hs-type">MonadState</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092593"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679092591"><span class="hs-identifier hs-type">t</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092592"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-77"></span><span>    </span><span id="local-6989586621679092451"><span class="annot"><span class="annottext">get :: t m s
</span><a href="#local-6989586621679092451"><span class="hs-identifier hs-var hs-var hs-var hs-var">get</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m s -&gt; t m s
forall (t :: (* -&gt; *) -&gt; * -&gt; *) (m :: * -&gt; *) a.
(MonadTrans t, Monad m) =&gt;
m a -&gt; t m a
</span><a href="../../transformers/src/Control.Monad.Trans.Class.html#lift"><span class="hs-identifier hs-var">lift</span></a></span><span> </span><span class="annot"><span class="annottext">m s
forall s (m :: * -&gt; *). MonadState s m =&gt; m s
</span><a href="System.Console.Haskeline.Monads.html#get"><span class="hs-identifier hs-var">get</span></a></span><span>
</span><span id="line-78"></span><span>    </span><span id="local-6989586621679092447"><span class="annot"><span class="annottext">put :: s -&gt; t m ()
</span><a href="#local-6989586621679092447"><span class="hs-identifier hs-var hs-var hs-var hs-var">put</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m () -&gt; t m ()
forall (t :: (* -&gt; *) -&gt; * -&gt; *) (m :: * -&gt; *) a.
(MonadTrans t, Monad m) =&gt;
m a -&gt; t m a
</span><a href="../../transformers/src/Control.Monad.Trans.Class.html#lift"><span class="hs-identifier hs-var">lift</span></a></span><span> </span><span class="annot"><span class="annottext">(m () -&gt; t m ()) -&gt; (s -&gt; m ()) -&gt; s -&gt; t m ()
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">s -&gt; m ()
forall s (m :: * -&gt; *). MonadState s m =&gt; s -&gt; m ()
</span><a href="System.Console.Haskeline.Monads.html#put"><span class="hs-identifier hs-var">put</span></a></span></span></span></span><span>
</span><span id="line-79"></span><span>
</span><span id="line-80"></span><span class="hs-comment">-- ReaderT (IORef s) is better than StateT s for some applications,</span><span>
</span><span id="line-81"></span><span class="hs-comment">-- since StateT loses its state after an exception such as ctrl-c.</span><span>
</span><span id="line-82"></span><span id="local-6989586621679092584"><span id="local-6989586621679092585"><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="../../base/src/Control.Monad.IO.Class.html#MonadIO"><span class="hs-identifier hs-type">MonadIO</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092585"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="System.Console.Haskeline.Monads.html#MonadState"><span class="hs-identifier hs-type">MonadState</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092584"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.Reader.html#ReaderT"><span class="hs-identifier hs-type">ReaderT</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.IORef.html#IORef"><span class="hs-identifier hs-type">IORef</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092584"><span class="hs-identifier hs-type">s</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><a href="#local-6989586621679092585"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-83"></span><span>    </span><span id="local-6989586621679092434"><span class="annot"><span class="annottext">get :: ReaderT (IORef s) m s
</span><a href="#local-6989586621679092434"><span class="hs-identifier hs-var hs-var hs-var hs-var">get</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ReaderT (IORef s) m (IORef s)
forall r (m :: * -&gt; *). MonadReader r m =&gt; m r
</span><a href="System.Console.Haskeline.Monads.html#ask"><span class="hs-identifier hs-var">ask</span></a></span><span> </span><span class="annot"><span class="annottext">ReaderT (IORef s) m (IORef s)
-&gt; (IORef s -&gt; ReaderT (IORef s) m s) -&gt; ReaderT (IORef s) m s
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; (a -&gt; m b) -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E%3D"><span class="hs-operator hs-var">&gt;&gt;=</span></a></span><span> </span><span class="annot"><span class="annottext">IO s -&gt; ReaderT (IORef s) m s
forall (m :: * -&gt; *) a. MonadIO m =&gt; IO a -&gt; m a
</span><a href="../../base/src/Control.Monad.IO.Class.html#liftIO"><span class="hs-identifier hs-var">liftIO</span></a></span><span> </span><span class="annot"><span class="annottext">(IO s -&gt; ReaderT (IORef s) m s)
-&gt; (IORef s -&gt; IO s) -&gt; IORef s -&gt; ReaderT (IORef s) m s
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">IORef s -&gt; IO s
forall a. IORef a -&gt; IO a
</span><a href="../../base/src/GHC.IORef.html#readIORef"><span class="hs-identifier hs-var">readIORef</span></a></span><span>
</span><span id="line-84"></span><span>    </span><span id="local-6989586621679092428"><span class="annot"><span class="annottext">put :: s -&gt; ReaderT (IORef s) m ()
</span><a href="#local-6989586621679092428"><span class="hs-identifier hs-var hs-var hs-var hs-var">put</span></a></span></span><span> </span><span id="local-6989586621679092427"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679092427"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ReaderT (IORef s) m (IORef s)
forall r (m :: * -&gt; *). MonadReader r m =&gt; m r
</span><a href="System.Console.Haskeline.Monads.html#ask"><span class="hs-identifier hs-var">ask</span></a></span><span> </span><span class="annot"><span class="annottext">ReaderT (IORef s) m (IORef s)
-&gt; (IORef s -&gt; ReaderT (IORef s) m ()) -&gt; ReaderT (IORef s) m ()
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; (a -&gt; m b) -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E%3D"><span class="hs-operator hs-var">&gt;&gt;=</span></a></span><span> </span><span class="annot"><span class="annottext">IO () -&gt; ReaderT (IORef s) m ()
forall (m :: * -&gt; *) a. MonadIO m =&gt; IO a -&gt; m a
</span><a href="../../base/src/Control.Monad.IO.Class.html#liftIO"><span class="hs-identifier hs-var">liftIO</span></a></span><span> </span><span class="annot"><span class="annottext">(IO () -&gt; ReaderT (IORef s) m ())
-&gt; (IORef s -&gt; IO ()) -&gt; IORef s -&gt; ReaderT (IORef s) m ()
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">(IORef s -&gt; s -&gt; IO ()) -&gt; s -&gt; IORef s -&gt; IO ()
forall a b c. (a -&gt; b -&gt; c) -&gt; b -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#flip"><span class="hs-identifier hs-var">flip</span></a></span><span> </span><span class="annot"><span class="annottext">IORef s -&gt; s -&gt; IO ()
forall a. IORef a -&gt; a -&gt; IO ()
</span><a href="../../base/src/GHC.IORef.html#writeIORef"><span class="hs-identifier hs-var">writeIORef</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679092427"><span class="hs-identifier hs-var">s</span></a></span></span></span><span>
</span><span id="line-85"></span><span>
</span><span id="line-86"></span><span id="local-6989586621679092576"><span id="local-6989586621679092577"><span id="local-6989586621679092578"><span class="annot"><a href="System.Console.Haskeline.Monads.html#evalStateT%27"><span class="hs-identifier hs-type">evalStateT'</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092578"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679092577"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.State.Strict.html#StateT"><span class="hs-identifier hs-type">StateT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092577"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092578"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092576"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679092578"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092576"><span class="hs-identifier hs-type">a</span></a></span></span></span></span><span>
</span><span id="line-87"></span><span id="evalStateT%27"><span class="annot"><span class="annottext">evalStateT' :: forall (m :: * -&gt; *) s a. Monad m =&gt; s -&gt; StateT s m a -&gt; m a
</span><a href="System.Console.Haskeline.Monads.html#evalStateT%27"><span class="hs-identifier hs-var hs-var">evalStateT'</span></a></span></span><span> </span><span id="local-6989586621679092423"><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679092423"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span id="local-6989586621679092422"><span class="annot"><span class="annottext">StateT s m a
</span><a href="#local-6989586621679092422"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">((a, s) -&gt; a) -&gt; m (a, s) -&gt; m a
forall (m :: * -&gt; *) a1 r. Monad m =&gt; (a1 -&gt; r) -&gt; m a1 -&gt; m r
</span><a href="../../base/src/GHC.Base.html#liftM"><span class="hs-identifier hs-var">liftM</span></a></span><span> </span><span class="annot"><span class="annottext">(a, s) -&gt; a
forall a b. (a, b) -&gt; a
</span><a href="../../base/src/Data.Tuple.html#fst"><span class="hs-identifier hs-var">fst</span></a></span><span> </span><span class="annot"><span class="annottext">(m (a, s) -&gt; m a) -&gt; m (a, s) -&gt; m a
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">StateT s m a -&gt; s -&gt; m (a, s)
forall s (m :: * -&gt; *) a. StateT s m a -&gt; s -&gt; m (a, s)
</span><a href="../../transformers/src/Control.Monad.Trans.State.Strict.html#runStateT"><span class="hs-identifier hs-var hs-var">runStateT</span></a></span><span> </span><span class="annot"><span class="annottext">StateT s m a
</span><a href="#local-6989586621679092422"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">s
</span><a href="#local-6989586621679092423"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-88"></span><span>
</span><span id="line-89"></span><span id="local-6989586621679092566"><span id="local-6989586621679092567"><span class="annot"><a href="System.Console.Haskeline.Monads.html#orElse"><span class="hs-identifier hs-type">orElse</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092567"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.Maybe.html#MaybeT"><span class="hs-identifier hs-type">MaybeT</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092567"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092566"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679092567"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092566"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679092567"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679092566"><span class="hs-identifier hs-type">a</span></a></span></span></span><span>
</span><span id="line-90"></span><span id="orElse"><span class="annot"><span class="annottext">orElse :: forall (m :: * -&gt; *) a. Monad m =&gt; MaybeT m a -&gt; m a -&gt; m a
</span><a href="System.Console.Haskeline.Monads.html#orElse"><span class="hs-identifier hs-var hs-var">orElse</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../transformers/src/Control.Monad.Trans.Maybe.html#MaybeT"><span class="hs-identifier hs-type">MaybeT</span></a></span><span> </span><span id="local-6989586621679092418"><span class="annot"><span class="annottext">m (Maybe a)
</span><a href="#local-6989586621679092418"><span class="hs-identifier hs-var">f</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679092417"><span class="annot"><span class="annottext">m a
</span><a href="#local-6989586621679092417"><span class="hs-identifier hs-var">g</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">m (Maybe a)
</span><a href="#local-6989586621679092418"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">m (Maybe a) -&gt; (Maybe a -&gt; m a) -&gt; m a
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; (a -&gt; m b) -&gt; m b
</span><a href="../../base/src/GHC.Base.html#%3E%3E%3D"><span class="hs-operator hs-var">&gt;&gt;=</span></a></span><span> </span><span class="annot"><span class="annottext">m a -&gt; (a -&gt; m a) -&gt; Maybe a -&gt; m a
forall b a. b -&gt; (a -&gt; b) -&gt; Maybe a -&gt; b
</span><a href="../../base/src/Data.Maybe.html#maybe"><span class="hs-identifier hs-var">maybe</span></a></span><span> </span><span class="annot"><span class="annottext">m a
</span><a href="#local-6989586621679092417"><span class="hs-identifier hs-var">g</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; m a
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span>
</span><span id="line-91"></span></pre></body></html>